<?php
/**
 * Created by ThinkPHP5.0.22.
 * User: 小涛.
 * Date: 2018/12/24.
 * Time: 22:12.
 */

namespace app\admin\model;

use think\Model;


/**
 * Class Banner banner轮滚
 * @package app\admin\model
 */
class Banner extends Model
{
    //banner轮滚图与图片的对应关系
    public function UploadLogo(){
        return $this -> belongsTo("Upload","logo","id");
    }

    //列表
    public static function listBanner(){
        return self::with("UploadLogo")
            -> order("sort desc") -> select();
    }

}